package com.rency.common.manager.servlet;

import javax.servlet.ServletException;

import com.rency.common.manager.services.ServiceProcessor;

public class StatViewServlet extends ResourceServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3579071163032511039L;
	
	private final ServiceProcessor serviceProcessor = ServiceProcessor.getInstance(); 

	public StatViewServlet(){
		super("META-INF/support/http/view/resources");
	}
	
	@Override
	public void init() throws ServletException {
		super.init();
		
	}

	@Override
	protected String process(String url) {
		String sectionUrl = url.replace(PARAM_ROOT_PATH, "");
		if(sectionUrl.startsWith("/")){
			sectionUrl = sectionUrl.substring(1, sectionUrl.length());
		}
		return serviceProcessor.service(sectionUrl);
	}
	
}